#include "StdAfx.h"
#include "VertexDirectoryUnitTests.h"
#include "VertexDirectory.h"
#include "Vertex.h"
//#include "Graph.h"
//#include "Group.h"
//#include <vector>

void InitializeVertexDirectory(set<vector<bool> > vertexSet)
{
	set<vector<bool> >::iterator it;
	for ( it=vertexSet.begin() ; it != vertexSet.end(); it++ )
	{
		Vertex* ver = new Vertex(*it);
		VertexDirectory::AddVertex(ver);
	}


}

TestUtils::TestResult UpdateVertexsFromChain() 
{
	//n=3, w=2
	// check if VertexDirectory wasn't already initialized, if so - initialize
	if (VertexDirectory::VertexCount() == 0)
	{
		set<vector<bool> > vertices;
		bool nameArr1[] = {0,1,1};
		vector<bool> name1 (nameArr1, nameArr1+sizeof(nameArr1)/sizeof(bool));
		vertices.insert(name1);
		bool nameArr2[] = {1,0,1};
		vector<bool> name2 (nameArr2, nameArr2+sizeof(nameArr2)/sizeof(bool));
		vertices.insert(name2);
		bool nameArr3[] = {1,1,0};
		vector<bool> name3 (nameArr3, nameArr3+sizeof(nameArr3)/sizeof(bool));
		vertices.insert(name3);
		InitializeVertexDirectory(vertices);
	}
	// initialize xmlReader
	return TestUtils::TestPassed;
}



